package com.entity;

import java.io.Serializable;

/**
 * @author 
 */
public class Comment implements Serializable {
    private Integer cmid;

    private String cmname;

    private Integer cmlevel;

    private Integer cmpid;

    private String cmval;

    private Integer cmord;

    private static final long serialVersionUID = 1L;

    public Integer getCmid() {
        return cmid;
    }

    public void setCmid(Integer cmid) {
        this.cmid = cmid;
    }

    public String getCmname() {
        return cmname;
    }

    public void setCmname(String cmname) {
        this.cmname = cmname;
    }

    public Integer getCmlevel() {
        return cmlevel;
    }

    public void setCmlevel(Integer cmlevel) {
        this.cmlevel = cmlevel;
    }

    public Integer getCmpid() {
        return cmpid;
    }

    public void setCmpid(Integer cmpid) {
        this.cmpid = cmpid;
    }

    public String getCmval() {
        return cmval;
    }

    public void setCmval(String cmval) {
        this.cmval = cmval;
    }

    public Integer getCmord() {
        return cmord;
    }

    public void setCmord(Integer cmord) {
        this.cmord = cmord;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Comment other = (Comment) that;
        return (this.getCmid() == null ? other.getCmid() == null : this.getCmid().equals(other.getCmid()))
            && (this.getCmname() == null ? other.getCmname() == null : this.getCmname().equals(other.getCmname()))
            && (this.getCmlevel() == null ? other.getCmlevel() == null : this.getCmlevel().equals(other.getCmlevel()))
            && (this.getCmpid() == null ? other.getCmpid() == null : this.getCmpid().equals(other.getCmpid()))
            && (this.getCmval() == null ? other.getCmval() == null : this.getCmval().equals(other.getCmval()))
            && (this.getCmord() == null ? other.getCmord() == null : this.getCmord().equals(other.getCmord()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCmid() == null) ? 0 : getCmid().hashCode());
        result = prime * result + ((getCmname() == null) ? 0 : getCmname().hashCode());
        result = prime * result + ((getCmlevel() == null) ? 0 : getCmlevel().hashCode());
        result = prime * result + ((getCmpid() == null) ? 0 : getCmpid().hashCode());
        result = prime * result + ((getCmval() == null) ? 0 : getCmval().hashCode());
        result = prime * result + ((getCmord() == null) ? 0 : getCmord().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", cmid=").append(cmid);
        sb.append(", cmname=").append(cmname);
        sb.append(", cmlevel=").append(cmlevel);
        sb.append(", cmpid=").append(cmpid);
        sb.append(", cmval=").append(cmval);
        sb.append(", cmord=").append(cmord);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}